(forward_to_next_line_start): When taking the shortcut
authorGerd Moellmann <gerd@gnu.org>
Thu, 22 Feb 2001 13:56:05 +0000 (13:56 +0000)
committerGerd Moellmann <gerd@gnu.org>
Thu, 22 Feb 2001 13:56:05 +0000 (13:56 +0000)
at the start of the function, check that the \n in it->c is
from the iterator's current position.

src/xdisp.c

index 4782b3b0e070d16f7131fcae2d51823dc647da46..3da744c9c73d6a09cf48f2a86ba878a9e4375b76 100644 (file)
@@ -3517,7 +3517,9 @@ forward_to_next_line_start (it, skipped_p)
 
   /* If already on a newline, just consume it to avoid unintended
      skipping over invisible text below.  */
-  if (it->what == IT_CHARACTER && it->c == '\n')
+  if (it->what == IT_CHARACTER
+      && it->c == '\n'
+      && CHARPOS (it->position) == IT_CHARPOS (*it))
     {
       set_iterator_to_next (it, 0);
       it->c = 0;